package com.yzzrjy.util;

import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;

public class RequestUtils {

    public static String getBody(HttpServletRequest request) throws IOException {
        BufferedReader br = request.getReader();
        String tmpStr, retStr = "";
        while ((tmpStr = br.readLine()) != null) {
            retStr += tmpStr;
        }
        br.close();
        return retStr;
    }
}
